Quantum-enhanced radiometry via approximate quantum error correction

Quantum sensing based on exotic quantum states is appealing for practical metrology applications and fundamental studies. However, these quantum states are vulnerable to noise and the resulting quantum enhancement is weakened in practice. Here, we experimentally demonstrate a quantum-enhanced sensing scheme with a bosonic probe, by exploring the large Hilbert space of the bosonic mode and developing both the approximate quantum error correction and the quantum jump tracking approaches. In a practical radiometry scenario, we attain a 5.3 dB enhancement of sensitivity, which reaches 9.1 × 10−4 Hz−1/2 when measuring the excitation population of a receiver mode. Our results demonstrate the potential of quantum sensing with near-term quantum technologies, not only shedding new light on the quantum advantage of sensing, but also stimulating further efforts on bosonic quantum technologies.


A. Basics about quantum metrology
In a quantum metrology experiment, a probe state is initialized as ρ, and then evolves in the environment associated with the parameter ω under detection, i.e. ρ → ρ ω = E ω (ρ,t), with E ω denoting the quantum channel and t being the duration of the evolution. Quantum Cramer-Rao bound is one of the most fundamental limits in such a quantum metrology experiment and determines the best precision for the estimation of the parameter with an unbiased estimator [1] ∆ω ≥ 1/ where F is the quantum Fisher information (QFI). QFI is the maximum classical Fisher information that could be achieved with an optimal measurement. It can be calculated as [1] Supposing the output probability distribution of the optimal measurement is {P i }, QFI can then be calculated as The detailed calculation for our scheme is provided in the Methods in the main text.

B. Ideal model
The practical quantum-enhanced sensing in our experiment is implemented based on the cross-Kerr effect between a receiver cavity and a probe cavity, and the dominant error in the detection is the amplitude damping of the probe. Therefore, we can simplify the model as the estimation of ω under the amplitude damping noise. The evolution of the probe could be described by the master equation (h = 1) where a is the annihilation operator of the bosonic mode, T 1 is the energy relaxation time of the bosonic mode, and is the Lindblad super-operator for a jump operator o. The evolution of the quantum state can also be described by the Kraus representation as where U ω (ρ) = e −iωta † a ρe iωta † a is the unitary evolution with the estimated parameter ω and is the operator for the k-photon-loss error during a sensing interrogation time of t int . As predicted theoretically by Zhou et al. [2], the ultimate Heisenberg limit is achievable via quantum error correction (QEC) when the interaction Hamiltonian and the decoherence effect (Lindblad form) satisfy the so-called "Hamiltonian-not-in-Lindblad span" (HNLS) condition. However, the model that we study in this work violates the HNLS condition, i.e. the sensing Hamiltonian ωa † a is subject to the Markovian noise described by the linear span of I, a, a † , a † a and the signal cannot be separated from the noise since they are not orthogonal to each other. In this case, the Heisenberg limit cannot be achieved with a finitedimensional probe state even provided with perfect quantum operation and noiseless ancillary qubits. However, although the ideal Heisenberg limit is not achievable, the protection of the probe from noise by QEC can still be advantageous in practical metrology applications.

Scheme with approximate QEC
As discussed above, we could not find an exact QEC code that is able to protect the quantum state from noise while preserving the accumulated sensing signal. Therefore, we resort to the approximate QEC codes [3] that could not perfectly correct the single-photon-loss errors. We choose the two-component Fock state superposition in the form |ψ m,n = α m,n |m + β m,n |n as a probe to sense the parameter ω by accumulating the relative phase between the two Fock states. We note that the jump of a single-photon loss would not destroy the relative phase. For approximate QEC codes, a universal and near-optimal way to construct the QEC channel is based on the transpose channel method [3]: where Π is the projection operator onto the code space, and N is the number of independent Kraus operators corresponding to the noisy evolutions that we want to reverse. Such a channel provides a universal means to construct a perfect recovery operation without exhaustive numerical optimization if the Knill-Laflamme condition [4] is satisfied, otherwise it provides a high-fidelity QEC recovery, i.e. it realizes R • E ≈ I. Considering the two-component Fock state superposition with the projection operator onto the code space Π = |n n| + |m m| (9) and the two major jump errors of the amplitude damping channel [Supplementary Eq. (7)] of {E 0 , E 1 } with we have a simple recovery channel constructed by the transpose channel method as where R i is a complementary operator to make R i unitary. The recovery operators correspond to the following processes: if the probe state loses one photon during the interrogation time t int , R 1 will be performed and drive the state back to the code subspace; otherwise, R 0 is performed that corresponds to no action to the code space. It is worth noting that the error syndrome can be detected by a parity measurement with an ancillary qubit, such as e −i π 2 a † aσ x that determines the even or odd parity of the mode with σ x being the Pauli operator on the ancilla qubit [5].

Achievable QFI
To characterize the best achievable sensitivity by our scheme, we first assume the QEC can be performed perfectly with infinitely high frequency and infinitesimal execution time, and then the damping channel could be converted to an effective master equation [6] By solving the equation with ρ (t) = ∑ j,k ρ j,k (t) | j k|, we obtain Therefore, for the initial state |ψ m,n = α m,n |m + β m,n |n , the QFI can be calculated as The optimal normalized QFI (F /t) is achieved when the interrogation time t opt = To obtain the maximum QFI, the optimal measurement bases should be chosen as |φ ± = (|n ± |m )/ √ 2. This can be proved as follows. The probabilities of measuring the final state Supplementary Eq. (15) along the basis states |φ + and |φ − are and 2T 1 , and ϕ = Arg α m,n β * m,n . Then the corresponding QFI is equal to the one we calculate in Supplementary Eq. (16) and can be derived as where the second equation is optimized with ω (m − n)t − ϕ = π 2 + kπ and k is an arbitrary integer.

Quantum jump tracking scheme
The QEC operations, i.e. Eqs. (12) and (13), could preserve the Fock state basis of the probe state while the amplitude is still influenced by the photon-jump errors, as a result of the approximate QEC codes. Different trajectories of the system with different numbers of photon jumps will give different amplitudes of the Fock states, and then the corresponding different pure states are mixed together giving a mixed output state. Thus, the interference fringes of the measurement of the relative phase degrade with time, even with perfect QEC operations. However, as we will see below that the QFI could be further enhanced if the number of jumps of different experimental trajectories is taken into account.
Supplementary Fig. 1 compares the probe cavity state evolutions with and without considering the photon jump trajectory. When an error projects the state from the code subspace into an orthogonal error subspace and the subsequent QEC recovers the state back to the code space, the code space will be deformed due to the photon-number-dependent amplitude decay, as illustrated in Fig. 1 of the main text. Therefore, by distinguishing the evolution trajectory of the quantum state and selectively performing operations on the state, we will get a pure state instead of a mixed state at the end of the experiment, which can enhance the final QFI. We call this method the quantum jump tracking (QJT) method. We will show how to apply this method in the above example and evaluate its effect on the enhancement.
It is known that QFI is convex [7] Here notation "⊕" is the direct sum and can be described in the matrix form as which represents two distinguishable states ρ 1,ω and ρ 2,ω of the system with probabilities p 1 and p 2 , respectively. For an initial state |ψ m,n = α m,n |m + β m,n |n with m n, the evolution with different photon losses can be tracked in each QEC cycle with  Table 3. the QJT method, therefore the final state can be described by the direct sum of states with different photon loss trajectories. With this description, the evolution with the QEC recycled for M times and an interrogation time τ int for each round becomes: During the whole evolution, we assume there is at most one photon loss in each QEC cycle. The number of the trajectories with x-photon losses in total is the binomial coefficient C x M . It is worth noting that trajectories with the same number of photon losses produce the same final state and we can describe them by sum instead of direct sum without changing the final QFI. In addition, the total dimension of the first term (⊕ M x=0 ) is (M + 1) 2 s 2 ρ if the dimension of the initial state ρ is s 2 ρ . The term Rest represents the rest part of the whole states. For this direct sum state, the QFI can be calculated easily: It can also be proved that the optimal measurement bases should be chosen as |φ ± = (|n ± |m ) / √ 2. This method is similar to that in Supplementary Sec. I B 2. The enhanced normalized QFI as a function of the total interrogation time t int = Mτ int is shown in Supplementary Fig. 2a and the numerical results with an ideal model prove the advantage of the QJT method.

C. Practical model
When it comes to the real experimental system, high-order photon jumps and operation errors should be taken into consideration. However, the GRAPE pulse for the QEC is complicated and makes it time-consuming to find the optimal initial probe state from simulation. In addition, the GRAPE pulse will not work perfectly in the presence of noise and operation errors, and will lead to the non-target states that are almost evenly distributed in the Hilbert space. We therefore approximate such a complex decoherence process as a depolarization channel in order to find the nearly optimal initial probe state without too much numerical calculation, i.e.
Here n tranc is the dimension of the truncated Fock space, and U is the target unitary operation that we want in the encoding, QEC, and decoding processes. The operation error probability, i.e. the depolarization probability, reads which is calculated according to the fidelity F GRAPE of the GRAPE process.
Although we make a significant simplification of the experimental decoherence, our error model seizes the main characteristics of the decoherence and could provide a reasonable estimation of the system performance. With this simplified model, we could estimate the nearly optimal working point and explain the experimental result quantitatively, while avoiding massive numerical simulations.

D. Influence of ancilla imperfection
To evaluate the influence of the ancilla imperfections including both the relaxation and the dephasing effects of the transmon qubit, we numerically study the QFI of the system with different experimental parameters base on the practical model. As shown in Supplementary Fig. 2b, when including the ancilla-imperfection-induced operation errors, the QEC scheme may lead to a reduction of the normalized QFI since it may mistake the error state and "correct" it into a wrong subspace. In contrast, the QJT scheme is still robust. We note that such a toy model only provides a rough estimation of the scheme performances, and the numerical results of the different schemes with a full model without simplification are provided in Supplementary Sec. III.  Figure 2: Normalized QFI as a function of the total interrogation time t int for different schemes. The initial probe state is ψ 1,5 = α 1,5 |1 + β 1,5 |5 , where both α 1,5 and β 1,5 are optimal corresponding to each scheme. a, The results with only the amplitude damping errors being considered during each interrogation time τ int = 0.066T 1 . It shows the QEC and the QJT schemes can outperform the scheme without QEC. b, The results with amplitude damping errors, high-order photon jumps, initial state preparation error ε ini = 0.035, operation errors ε op = 0.031, and the measurement error ε meas = 0.038 being considered. The decoherence parameters of the system in the simulation are consistent with the measured ones given in Supplementary Table 1. When these errors are included, the normalized QFI in the QEC scheme may be worse than the scheme without QEC, but the QJT scheme could still perform better.
To further reveal the potential limitation of the radiometry performance due to the ancilla imperfections, we simulate the practical model introduced above with different operation errors x×ε op , by varying the scaling factor x, with ε op = 0.04 according to our experimental setup. Supplementary Fig. 3a plots the the enhancement factor 20 log 10 (Q/Q 0 ), where Q 0 is the normalized QFI with x = 1 corresponding to the real experimental condition. In the simulation, the total interrogation time (t int = Mτ int = 0.3T 1 ) and the initial state ( ψ 1,5 = (|1 + |5 ) / √ 2) are fixed and the repetition round M is numerically optimized to get the maximum achievable Q. According to these results, as the operation error decreases, more frequent QEC operations are allowed and higher normalize QFI can be achieved. These results illustrate the potential improvement of our scheme by reducing the operation errors in practical experiments. i.e. more frequent QEC operations and better normalized QFI can be obtained.

E. Signal-induced dephasing
The radiometry depicted in the main text includes the probe mode, the receiver mode, and the environment radiation that is to be detected. Although the excitations in the receiver mode would induce a frequency shift of the probe cavity, the fluctuation of the excitation numbers in the receiver would also induce a fluctuation of the probe frequency, and eventually gives rise to a dephasing effect of the probe cavity. In our current experimental setup, we investigate the accumulated phase of the probe cavity while neglecting the potential dephasing effect. In the following, we provide a detailed derivation to show that the dephasing effect is negligible for current experimental parameters.
The system could be described by the Hamiltonian with the system's steady state interaction and fluctuations Here, the bosonic operators a, b and c Ω denote the probe, the receiver, and the environment continuum modes, respectively. χ is the cross-Kerr coefficient between the probe and the receiver modes. p is the average excitation number induced by the environment radiation in the receiver (mode b). g Ω denotes the coupling strength between the receiver mode and the continuum modes in the cable. Due to the quantum nature of radiations, the photon number fluctuation of the field b † b − p would induce a decoherence effect on the probe. Here, we study this decoherence effect with our system parameters in the weak dispersion limit, i.e. χ κ b with κ b being the amplitude decay rate of the receiver.
In the rotating frame of H 0 , we have b = e iH 0 t be −iH 0 t and c Ω = e iH 0 t c Ω e −iH 0 t , and thus Under the white-noise approximation g Ω = g 0 and the Weisskopf-Wigner approximation, the receiver and the continuum coupling induces an external coupling loss rate κ b = π f 0 g 2 0 , with f Ω being the density of states. Neglecting the intrinsic loss of the receiver cavity, we obtain the formal solution of the receiver as and the excitation number For the probe state ρ a , under the Born-Markov approximation, the evolution follows where the subscript R denotes both the system b and the continuum. For simplicity, we consider a component ρ a,mn = m| ρ a |n in the Fock basis following the evolution which corresponds to the master equation with a dephasing effect as The corresponding probe cavity dephasing rate is Considering the case with the environment continuum modes centered at Ω 0 and an average excitation p = n coh and neglecting the thermal environment, we have For the case with a thermal input to the receiver, which corresponds to a thermal equilibrium excitation number p = n th , we have γ dph = n 2 th + n th Comparing with the coherent phase accumulation rate χ p, the dephasing rates γ dph for both coherent and thermal signals in the receiver are negligible with our current experimental setup because χ/κ b 1 and n th 1.  Table 1.

F. Influence of signal-induced dephasing
As mentioned in the section above, signal could induce dephasing effect in the probe mode. Although the dephasing rate is negligible when compared with other decoherence rates, this effect could impose an ultimate limitation of the precision for our radiometry even in the ideal case. To show the influence of the signal-induced dephasing, we analytically calculate the approximate QEC scheme with continuous and perfect recovery operations. The evolution with the dephasing noise and recovery can be written as where γ dph could be evaluated by Supplementary Eq. (40) or Supplementary Eq. (41). By solving the equation with ρ (t) = With the same initial state |ψ m,n = |m +|n √ 2 and the interrogation time For m = 1 and n 1, Q ω = T 1 e ne −2γ dph T 1 n . Compared with the situation without the dephasing [Supplementary Eq. (17)], the signal-induced dephasing introduces an additional factor e −2γ dph T 1 n to the normalized QFI. Therefore, the enhancement of the sensing by the non-trivial quantum state and the error correction will be eventually limited for large n.
The potential influence of the signal-induced dephasing in our practical system is further investigated by numerically studying the normalized QFI. In the practical model, the photon loss error of the probe mode, the imperfect operations due to the imperfect ancilla, and the signal-induced dephasing are considered. The results are summarized in Supplementary Fig. 4, with the input probe state being initialized as |1 +|n √ 2 . Comparing the results for AQEC with and without the signal-induced dephasing, the QFI degrades due to the dephasing when n increases as expected. The signal-induced dephasing effect starts to be significant when n ∼ 100. and T q,s φ are the transition frequency, energy relaxation time, and pure dephasing time, respectively. The subscripts and superscripts q, r, and s denote the transmon qubit, the receiver cavity, and the probe cavity, respectively. For simplicity, we have referred to T s 1 as T 1 in the main text and for the rest of Supplementary Information. χ qs , χ qr , χ sr are the cross-Kerr coefficients. K q , K r , K s , K s are the higher-order self-Kerr coefficients. All parameters are experimentally measured, except for K r which is predicted through χ qr = −2 K q K r according to the black-box quantization theory [8].

A. Experimental device and measured parameters
The experimental system consists of one ancillary transmon qubit and two three-dimensional cavities. The cavity with a long lifetime serves as the probe mode, while the other short-lived one is employed for fast high-fidelity readout of the qubit and particularly works as the receiver cavity for receiving the microwave signal from the outside in the sensing protocol. The Hamiltonian of the whole system can be written as where a q,s,r are the annihilation operators of the ancilla qubit, the probe mode, and the receiver cavity, respectively; ω q,s,r are the corresponding frequencies; χ qs , χ qr , χ sr are the cross-Kerr coefficients; K q , K r , K s , K s are the higher-order self-Kerr coefficients.
As demonstrated in the previous work [9], since the QEC operation is fast compared to the evolution time and the higher-order terms can be neglected, the above Hamiltonian can be approximated as In this system, the ancilla qubit dispersively couples to the photonic states in both the probe and the receiver cavities. With the assistance of the ancilla qubit, arbitrary unitary operation of the probe state can be implemented with selective photon-numberdependent arbitrary phase gate (SNAP) [10] or optimal quantum control by gradient ascent pulse engineering (GRAPE) [11,12]. The interaction between the probe and the receiver modes allows the sensing protocol demonstrated in our work. In addition, the separation of probe and receiver provides the advantages of both longer coherence time and relatively larger bandwidth. The parameters of the experimental device are summarized in Supplementary Table 1. The detailed experimental setup can also be found in Ref. [13].

B. Characterization and calibration
In the main text, we experimentally demonstrate the QEC-enhanced quantum sensing of the excitation number (p) in an electromagnetic mode of the receiver cavity. This sensing relies on the cross-Kerr interaction χ sr between the probe and the receiver, and the final accumulated sensing signal on the probe state is then mapped to the ancilla that is measured at the end of the experiment. The cross-Kerr interaction χ sr is obtained by measuring the receiver spectrum after deterministically preparing the Fock state |n in the probe cavity. To increase the resolution in the regime of χ sr κ r , we prepare the Fock states |n = 0 and |n = 10 in the probe cavity respectively and obtain χ sr from the frequency shift of the receiver. The measured χ sr = 15.3 kHz and this value agrees well with the estimated value based on the black-box quantization theory [8] with a deviation of 2%.  Figure 5: Calibration of the signal strength in the receiver cavity. a, Pulse sequence for the photon-induced-dephasing measurement. Two π/2 qubit pulses are separated by τ = 5 µs, during which a square pulse with varied amplitudes for a duration of τ p = 3 µs to excite the photonic field in the receiver cavity. τ p is long enough for a steady state in the receiver cavity while the ancilla remains sufficiently coherent. By sweeping the phase difference ϕ of the two π/2 pulses, we can observe an oscillating interference signal of qubit population as a function of the signal strength. b, The ground state population P g of the ancilla qubit as a function of the DAC level of the signal pulse. By fitting the envelope with a Gaussian function, The DAC level corresponding to a mean excitation number in the receiver mode p = 1 can be acquired.
In our demonstration, the signal from a typical radiative source is replaced by a coherent signal injected into the receiver cavity. The signal strength in the receiver cavity is calibrated by a photon-induced-dephasing process with the assistance of the ancilla qubit [14]. As shown in Supplementary Fig. 5a, the experimental sequence is a Ramsey-type measurement of the ancilla qubit inserted by a signal pulse with various amplitudes for a duration τ p . We can observe Ramsey fringes with a decaying amplitude envelope e −τΓ 2 −τ p Γ p , where Γ 2 is the intrinsic dephasing rate, the photon-induced-dephasing rate Γ p = 2pκ r sin 2 (tan −1 (χ qr /κ r )), κ r is the dissipation rate of the receiver, and χ qr is the interaction between the qubit and the receiver. The measured probability of the qubit at the ground state P g as a function of the signal pulse amplitude is shown in Supplementary Fig. 5b. Thus we can obtain a calibration of the signal strength p in the receiver cavity. We choose a long-enough duration of the signal to ensure the receiver is at the steady state while the ancilla qubit is still sufficiently coherent.  2 against the initial phase ϕ 0 with an interrogation time t int = 0.2T 1 ) with the digitized switch "on" but with nominally "zero" signal strength and "off" for completelly suppressing the leakage of the signal, respectively. b, The pure dephasing rate of the qubit Γ ϕ as a function of the signal pulse amplitude in a photon-induced-dephasing experiment. The measurement protocol is shown in the inset. Blue dots show the experimental results and the red line represents a fit with a quadratic function, giving a leakage level of p BG = 8.8 × 10 −5 .
Even though no photon is intentionally injected into the receiver externally, the external noise added to the receiver can be detected by the probe. The background noise in the receiver includes the thermal excitation by the environment and also the leakage from the signal source. We note that the input of the signal to the receiver cavity is controlled by a switch and the leakage can be completely suppressed by turning off the switch. To evaluate the influence of the signal leakage when the switch is on and the signal strength is nominally "zero" , we follow the sequence of Fig. 2a in the main text for a sensing test, we display two oscillation curves in Supplementary Fig. 6a, both for t int = 0.2T 1 corresponding to the "on" (blue dots, with nominally "zero" signal strength) and "off" (red triangles) states of the switch, respectively. The comparison of these two curves shows the signal leakage is almost negligible.
To estimate the weak leakage more precisely, an alternative method is to measure the change of the pure dephasing rate of the ancilla qubit as the signal strength increases in a photon-induced-dephasing experiment (the protocol is similar to Supplementary  Fig. 5a but also with a varying τ and is shown in the inset of Supplementary Fig. 6b). Supplementary Fig. 6b shows the pure dephasing rate Γ ϕ as a function of the signal pulse amplitude. By fitting the curve with a quadratic function, we can acquire the signal leakage in the receiver cavity p BG = 8.8 × 10 −5 when the derivative equals zero.  The optimized coefficients α 1,n and the interrogation time τ int for the photonic probe state of ψ 1,n = α 1,n |1 +β 1,n |n used in the experiment with the QJT method.
The numerically optimized interrogation times τ int are shown in Supplementary Table 2 and Supplementary Table 3 based on the simplified model in Sec. I C. In practice, the parameters used in the experiment could be further optimized according to the actual experimental performance. For comparison, the experiment without QEC is carried out with the interrogation time where M is the number of the QEC repetitions.

D. Sensing with virtual phases
When implementing the experiment without QEC, the phase shift between the two components of the probe mode would accumulate for different evolution times owing to the Kerr effect. Such a Kerr effect induces a deterministic phase between different Fock states, and this resulted extra phase during the evolution is compensated in later experiments. The measured P g for |ψ 1,3 , ψ 1,5 , and |ψ 1,7 as a function of the initial phase ϕ 0 and the interrogation time t int are displayed in Supplementary  Figs. 7a, 7c and 7d, respectively. To show more clearly, the data in Fig. 2 of the main text have been adjusted by appropriate phase shifts, which are shown in Supplementary Fig. 7b and correspond to the Kerr effect for n = 3.
When the experiment with repeated QEC is carried out, the phase shifts due to the Kerr effect are corrected within the correction GRAPE pulse. Supplementary Figs. 8a and 8b show the measured P g for ψ 1,5 and |ψ 1,7 with repeated QEC, respectively. In this case, the phase shifts with different QEC repetition rounds are due to the non-perfect measurement-inducedphase compensation. As a result, before sensing the signal, it is necessary to figure out the optimal working point of the radiometry. For different total interrogation times t int , the optimal working points ϕ opt are chosen where the slope In the QJT scheme, following the experimental sequence in Fig. 2b of main text, the result of each measurement is recorded. The ground state population of the ancilla P g, j|M , corresponding to the trajectory with the single-photon-loss error occurring j times among M repetitions of QEC, can be fitted with P g, j|M = A g, j + B g, j cos (ϕ g, j + ϕ 0 ). Taking |ψ 1,3 = α 1,3 |1 + β 1,3 |3 as an example, the results of first four repetitions have been shown in Supplementary Fig. 9. The normalized QFI for the QJT method can be calculated according to the experimentally measured Ramsey fringes, as shown in Fig. 3 of the main text. The processing procedure of the experimental data is provided in the Methods section of the main text.  The measured ground state population of the ancilla P g for ψ 1,5 = α 1,5 |1 + β 1,5 |5 and ψ 1,7 = α 1,7 |1 + β 1,7 |7 , respectively, with the parameters shown in Supplementary Table 2.

E. Radiometry protocol
In the following, we provide more details of our experimental sequences and results. Characterization of the sensitivity with QEC is carried out following the sequence shown in Supplementary Fig. 10a, while the sequence without QEC is displayed in Supplementary Fig. 10b. After encoding, the probe is set at the optimal working point with ϕ 0 = ϕ opt , which is calibrated as described in Supplementary Sec. II D. Sensing the steady state of a coherent signal in the receiver is reflected on the phase accumulation between the two components of the bosonic probe, and such an accumulated phase is then decoded onto the qubit that is measured in the end. Supplementary Fig. 11a shows the qubit ground population P g as a function of the signal strength p in the receiver, where the probe state is |ψ 1,3 = (|1 + |3 )/ √ 2 with repeated QEC for M = 4 times and each interrogation time τ int = 0.1T 1 . For comparison, the experiment in which the probe and the receiver interact for t int = 0.4T 1 without QEC is also shown with a smaller oscillation amplitude. The interrogation time is optimized in the experiment and shown in Supplementary Table 2, followed by a short waiting time for the evacuation of the photons in the receiver to minimize their deleterious effect on the QEC process. Supplementary Fig. 11b shows the sensing signal for |ψ 1,3 with QEC for different repetition rounds M. The oscillation frequency of P g (p) increases with more repetitions, while the contrast of the signal diminishes. For different probe states, when implementing the QEC process only once, the sensing signals are demonstrated in Fig. 4c of the main text, following the experimental parameters shown in Supplementary Table 2. Supplementary Fig. 11c shows the results with the QJT scheme. The Ramsey fringes show a reduction of the contrast with more occurrence of single-photon-loss errors. From the measured P g (p), the sensitivity of our radiometry can be calculated, as shown in Fig. 4d of the main text.

A. Model for numerical simulation
Taking the drives for the GRAPE-optimized quantum control into the model, the system evolution (including the initialization, gates, and measurements) could be numerically simulated based on the effective Hamiltonian in the rotating frame as Here, Ω q 1 (t), Ω q 2 (t) and Ω s 1 (t), Ω s 2 (t) are quadratures of the time-dependent drives on the qubit and the probe cavity, respectively. Ω r is the drive strength for the receiver cavity, mimicking the signal to be detected by the radiometry. The expected value of Ω r can be calculated by considering the drive power P d applied at frequency ω r on resonance with the receiver cavity. From the input-output theory, the receiver drive strength is given by Ω r ∼ √ P d ∝ √ pκ r , where p is the average photon number in the receiver cavity in the steady state and κ r is the decay rate of the receiver cavity. Note that the receiver cavity is a two-sided one with κ r ≈ κ out κ in , where κ out and κ in are the output and input coupling constants, respectively. The whole evolution process can be described by the master equation taking into account the relaxations of both the probe and the ancilla qubit. The numerical simulations are implemented by QuTip [15] using the device parameters from the experimental characterization in Supplementary Table 1. The qubit thermal population n q th ∼ 0.01 and the thermal population of the probe p s th ∼ 0.01. Numerical simulations imitate the experimental protocol and the results are represented in Supplementary Fig. 12, showing good agreement with the experimental results. The deviation of the simulation from the experiment is probably due to high-order interaction terms and decoherence that are not taken into account in the above effective Hamiltonian. Supplementary Fig. 13 shows the simulated photon number sensitivity for different probe states, in good agreement with the experiments.

B. Analysis of imperfections in the real experiment
In Sec. I B, an ideal model is introduced and described, where perfect state initialization, evolution, QEC operation, and detection are assumed, and only the amplitude damping of the probe cavity and the approximate QEC approach to combat this decoherence effect are studied. In practical experiments, imperfections should be taken into consideration, such as the self-Kerr effect, dephasing, and thermal excitations of the probe cavity and the qubit, because they could induce other high-order noise, operation errors, and measurement errors. As shown in Supplementary Fig. 2b, the inclusion of these imperfect factors helps to construct a more realistic model. It is worth noting that only the calibrated parameters and the control pulse envelope from GRAPE are used in the simulation, and no further assumptions or parameters are used.
To quantitatively analyze the impact of these imperfections, Fisher information loss (FIL) can be induced: where F Ideal is the QFI from the ideal model as described above and in Sec. I B, while F Imp is the QFI when including certain imperfections in the model. The numerical calculation is shown in Supplementary Table 4. It shows that with the increase of n   (the higher-level component), the corresponding FIL tends to increase. Among all the imperfections, operation errors during the QEC process have the greatest influence on the sensitivity, followed by the errors during the sensing evolution of the probe and the GRAPE pule error during the measurement process. Errors during the initialization seem to be negligible. In the following, we will investigate in detail the imperfections in the state initialization, evolution, QEC, and detection processes separately and numerically. We note that the parameters of the experimental device is shown in Supplementary  Table 1, the optimized coefficients of the initial probe states and the interrogation times are shown in Supplementary Table 2 and  Table 3, and the recycle numbers M = 6, 3, 2 for n = 3, 5, 7, respectively, corresponding to the optimal normalized QFI in the real experiment.

State initialization imperfection
The initialization process can be divided into two parts. First, the ancilla qubit state is initialized to |ψ m,n = α m,n |g + β m,n e iϕ 0 |e with an initial phase (ϕ 0 ) and optimized α m,n and β m,n (Supplementary Table 2 and Supplementary Table 3) in 20 ns. It is worth noting that higher-level Fock states correspond to higher energies in the probe cavity and experience stronger damping effects, and thus larger n is associated with a higher fidelity loss during the control pulse, which is also the case in the followed processes. Second, the information is encoded from the ancilla qubit to the photonic state in the probe cavity (|ψ m,n ) via a GRAPE control pulse with a length of 800 ns. Although the decoherences of the ancilla qubit and the probe mode induce FIL, this process with a short duration only accounts for 0.02% ∼ 0.03% of the FIL.

Evolution imperfection
During the sensing evolution process of the probe in a real metrology experiment, the probe quantum state accumulates an extra phase through the cross-Kerr interaction with the receiver cavity. In addition to the amplitude damping error, the probe will also experience the extra self-Kerr effect, thermal excitation, as well as the dephasing due to the ancilla qubit. Via numerical simulations, these imperfections account for 10.7% ∼ 17.9% of the FIL.

QEC imperfection
The experimental QEC procedure consists of the following steps. (i) GRAPE pulse. The QEC is implemented autonomously via a GRAPE pulse (800 ns long) to complete a unitary operation on the composite probe-ancilla system. This autonomous operation could stabilize the probe state to the odd parity: add a photon when the parity changes, i.e. α m,n √ m |m − 1 + β m,n √ ne iθ |n − 1 |g is converted to α m,n √ m |m + β m,n √ ne iθ |n |e if a single-photon-loss error occurs; perform an identity operation to the probe if the parity is conserved. During this period, there are decoherences in both the probe cavity and the ancilla qubit, as well as imperfections of the GRAPE pulse.
(ii) Qubit measurement. The ancilla qubit state indicates whether the single-photon-loss error has occurred or not. Although the output of the ancilla is not important in conventional QEC process for keeping quantum information, the trajectory of the system evolution is important in our quantum metrology experiments. Therefore, we also both measure and record the ancilla outcomes, and feed the results for the QJT-enhanced sensing. To measure the ancilla qubit, a pulse is injected into the receiver cavity, which will lead to a non-negligible dephasing effect in the probe cavity.
(iii) π-pulse: After the measurement, if an excited state of the ancilla qubit |e is detected, a π pulse will be carried out with a latency of 336 ns to reset the ancilla qubit to the ground state |g .
For all the processes above, the probe state keeps evolving in the presence of decoherences. Besides, all the mentioned pulses are not perfect, i.e. the fidelity of the gates by the GRAPE-optimized pulses could not be unity even if there is no any decoherence. From our numerical simulations, these factors account for the majority of the FIL about 30.2% ∼ 37.5%.

Measurement imperfection
In the final measurement process, the amplitude and phase information of the probe is transferred from the probe state back to the ancilla qubit via another 800 ns-long decoding GRAPE pulse. Subsequently, a Hadamard gate and a projection measurement are performed on the ancilla qubit. Similarly, decoherences of the probe and the ancilla during these operations and the imperfect pulses will affect the final interference curve. Additionally, the readout error of the ancilla would also contribute to the measurement imperfection, with the fidelity matrix described in Supplementary Fig. 14. Totally, these two parts contribute to the FIL for about 17.9%.

C. Derivation of the sensitivity
The excitation population of the receiver cavity is derived from the measured phase of the probe state. As shown in the calibration process, the outcomes of the detection show interference curves when varying the virtual phase ϕ 0 of the probe state |Ψ m,n = α m,n |m + β m,n e iϕ 0 |n . For example, for the simplest case without QJT, the curves can be fit by P g (ω) = A + B cos ω n − m t int + ϕ 0 and P e = 1 − P g . Both the accumulated phase of Fock state |n with respect to |m and the virtual phase induce the interference, and thus the QFI for measuring ω can be calculated as The corresponding achievable measurement uncertainty of ω for a single trial of the sensing experiment is For a total experimental time t tot , the sensitivity of ω in a unit time reads with the normalized QFI For the radiometry, the cross-Kerr effect induces the frequency shift of the probe, as δ ω s = χ sr p, with p being the excitation population in the receiver mode. Therefore, the sensitivity of measuring the excitation population in the receiver mode in the experiment is For different experimental procedures, Q ω or Q p are derived from experimental data, and more details could be found in the Methods section of the main text. Especially, the measurement outputs are grouped according to the numbers of detected quantum jumps and separately processed. We now provide the detail of the data analysis in Fig. 3 and Fig. 4 of the main text at the optimal point with the probe state ψ 1,5 (Fig. 3c, Fig. 4e). In Fig. 3c of the main text, the normalized QFI for the QEC+QJT strategy is calculated as where t tot includes the interrogation time τ int = 14500 ns, QEC operation time of 1484 ns (both are repeated for three times), as well as the duration of 1940 ns for encoding and decoding. For the results in Fig. 4e Here, ∂ P l, j|M ∂ p is obtained directly from the slope of experimental curve against p. Therefore, we obtain the sensitivity